<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>

    <!-- Meta -->
    <meta name="description" content="Premium Quality and Responsive UI for Dashboard."/>
    <meta name="author" content="ThemePixels"/>

    <link rel="shortcut icon" th:href="@{/admin/picture/favicon.ico}" type="image/x-icon"/>
    <title>旅游管理系统</title>

    <!-- vendor css -->
    <link th:href="@{/admin/css/font-awesome.css}" rel="stylesheet"/>
    <link th:href="@{/admin/css/ionicons.css}" rel="stylesheet"/>
    <link th:href="@{/admin/css/perfect-scrollbar.css}" rel="stylesheet"/>
    <link th:href="@{/admin/css/github.css}" rel="stylesheet"/>
    <link th:href="@{/admin/css/jquery.datatables.css}" rel="stylesheet"/>
    <link th:href="@{/admin/css/select2.min.css}" rel="stylesheet"/>


    <!-- Starlight CSS -->
    <link rel="stylesheet" th:href="@{/admin/css/starlight.css}"/>
</head>

<body>

<!-- ########## START: LEFT PANEL ########## -->
<div class="sl-logo"><a href=""><img th:src="@{/admin/picture/mt_logo_wh.jpg}" style="width: 30px; height: 30px;"/> <span
        style="font-size: 18px">旅游管理系统</span></a></div>
<div class="sl-sideleft">

    <label class="sidebar-label">导航栏</label>
    <div class="sl-sideleft-menu">
      <a href="#" class="sl-menu-link">
            <div class="sl-menu-item">
                <i class="menu-item-icon icon ion-ios-gear-outline tx-24"></i>
                <span class="menu-item-label">会员管理</span>
                <i class="menu-item-arrow fa fa-angle-down"></i>
            </div><!-- menu-item -->
        </a><!-- sl-menu-link -->
        <ul class="sl-menu-sub nav flex-column" >
            <li class="nav-item"><a th:href="@{/root/findAllAdminByLevel}" class="nav-link">会员列表</a></li>
           <!--  <li class="nav-item"><a th:href="@{/root/addMember}" class="nav-link">会员添加</a></li>
            <li class="nav-item"><a th:href="@{/root/delMember}" class="nav-link">会员删除</a></li> -->
        </ul>
        <a href="#" class="sl-menu-link">
            <div class="sl-menu-item">
                <i class="menu-item-icon icon ion-ios-gear-outline tx-24"></i>
                <span class="menu-item-label">酒店管理</span>
                <i class="menu-item-arrow fa fa-angle-down"></i>
            </div><!-- menu-item -->
        </a><!-- sl-menu-link -->
        <ul class="sl-menu-sub nav flex-column" >
              <li class="nav-item"><a th:href="@{/root/findAllHotels}" class="nav-link">酒店列表</a></li>
            <li class="nav-item"><a th:href="@{/root/addHotel}" class="nav-link">酒店添加</a></li>
            <li class="nav-item"><a th:href="@{/root/delHotel}" class="nav-link">酒店删除</a></li>
        </ul>
    </div><!-- sl-sideleft-menu -->

</div><!-- sl-sideleft -->
<!-- ########## END: LEFT PANEL ########## -->

<!-- ########## START: HEAD PANEL ########## -->
<div class="sl-header">
    <div class="sl-header-left">
        <div class="navicon-left hidden-md-down"><a id="btnLeftMenu" href=""><i class="icon ion-navicon-round"></i></a></div>
        <div class="navicon-left hidden-lg-up"><a id="btnLeftMenuMobile" href=""><i class="icon ion-navicon-round"></i></a></div>
    </div><!-- sl-header-left -->
    <div class="sl-header-right">
        <nav class="nav">
            <div class="dropdown">
                <a href="" class="nav-link nav-link-profile" data-toggle="dropdown">
                    <span class="logged-name" th:text="${user.companyShortName} + ' | ' + ${user.name}">信息技术系 | 网络工程</span>
                    <img th:src="@{/picture/mt_logo_wh.jpg}" class="wd-32 rounded-circle" alt=""/>
                </a>
                <div class="dropdown-menu dropdown-menu-header wd-200">
                    <ul class="list-unstyled user-profile-nav">
                        <li><a href=""><i class="icon ion-ios-person-outline"></i> Edit Profile</a></li>
                        <li><a href=""><i class="icon ion-ios-gear-outline"></i> Settings</a></li>
                        <li><a href=""><i class="icon ion-ios-download-outline"></i> Downloads</a></li>
                        <li><a href=""><i class="icon ion-ios-star-outline"></i> Favorites</a></li>
                        <li><a href=""><i class="icon ion-ios-folder-outline"></i> Collections</a></li>
                        <li><a th:href="@{/logout}"><i class="icon ion-power"></i> Sign Out</a></li>
                    </ul>
                </div><!-- dropdown-menu -->
            </div><!-- dropdown -->
        </nav>
        <div class="navicon-right">
            <a id="btnRightMenu" href="" class="pos-relative">
                <i class="icon ion-ios-bell-outline"></i>
                <!-- start: if statement -->
                <span class="square-8 bg-danger"></span>
                <!-- end: if statement -->
            </a>
        </div><!-- navicon-right -->
    </div><!-- sl-header-right -->
</div><!-- sl-header -->
<!-- ########## END: HEAD PANEL ########## -->

<!-- ########## START: RIGHT PANEL ########## -->

<!-- ########## END: RIGHT PANEL ########## -->

<!-- ########## START: MAIN PANEL ########## -->
<div class="sl-mainpanel">
    <nav class="breadcrumb sl-breadcrumb">
        <a class="breadcrumb-item" th:href="@{/activity/list}">旅游管理系统</a>
        <a class="breadcrumb-item" th:href="@{/activity/list}">活动项目列表</a>
        <span class="breadcrumb-item active">客户登记列表</span>
    </nav>

    <div class="sl-pagebody">
        <!--<div class="sl-page-title">-->
            <!--<h5>Data Table</h5>-->
            <!--<p>DataTables is a plug-in for the jQuery Javascript library.</p>-->
        <!--</div>&lt;!&ndash; sl-page-title &ndash;&gt;-->

        <div class="card pd-20 pd-sm-40">
            <h6 class="card-body-title">活动客户登记列表</h6>
            <p class="mg-b-20 mg-sm-b-30">The list of register Customer's information.</p>

            <form th:action="@{/activity/list}" method="post" onsubmit="return valiForm();">
                <div class="row">
                    <div class="col-lg-8 mg-b-10">
                        <div class="input-group">
                            <input type="text" class="form-control clo-sm-6 col-md-4" name="keywords"
                                   placeholder="按姓名搜索..."/>
                            <input type="hidden" id="type"/>
                            <span class="input-group-btn mg-r-20">
                                <button class="btn bd bg-white tx-gray-600" type="submit"><i class="fa fa-search"></i>
                                </button>
                            </span>
                            <!--<a class="btn btn-info active btn-block col-lg-3" th:href="@{/addUser}" th:if="${user.isManagement eq 2}">新增消费信息</a>-->
                            <a class="btn btn-info active btn-block col-lg-3" th:href="@{'/saleRecordForm?activityId=' + ${activityId}}" th:if="${user.isManagement} eq 0">新增销售记录</a>
                        </div><!-- input-group -->
                    </div><!-- col-4 -->
                </div><!-- row -->
            </form>

            <div class="table-responsive">
                <table class="table table-hover table-bordered mg-b-0">
                    <thead class="bg-info">
                    <tr>
                        <th class="wd-10p" style="text-align: center">客户名称</th>
                        <th class="wd-15p" style="text-align: center">联系方式</th>
                        <th class="wd-20p" style="text-align: center">身份证号码</th>
                        <th class="wd-10p" style="text-align: center">所属公司</th>
                        <th class="wd-15p" style="text-align: center">备注</th>
                        <th class="wd-10p" style="text-align: center">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr th:each="act : ${list}">
                        <td style="text-align: center" th:text="${act.customer}"></td>
                        <td style="text-align: center" th:text="${act.mobilePhone}">00000000000</td>
                        <td style="text-align: center" th:text="${act.idCard}"></td>
                        <td style="text-align: center" th:text="${act.companyShortName}"></td>
                        <td style="text-align: center" th:text="${act.remark}"></td>
                        <td style="text-align: center"><a th:href="@{/saleRecord/{id}(id=${act.id})}">查看详情</a></td>
                    </tr>
                    </tbody>
                </table>
            </div><!-- table-responsive -->

            <!--页码 start-->
            <div class="ht-80 bd d-flex align-items-center justify-content-center">
                <nav aria-label="Page navigation">
                    <ul class="pagination pagination-basic mg-b-0">

                        <li th:class="${page.pageNo eq 1} ? 'page-item' : 'page-item'">
                            <a class="page-link" aria-label="First" th:if="${page.pageNo eq 1}" href="#">
                                <i class="fa fa-angle-double-left"></i>
                            </a>
                            <a class="page-link" aria-label="First" th:if="${page.pageNo ne 1} and ${page.pageNo &lt; 10}" th:href="@{/activity/list(pageNo=1)}">
                                <i class="fa fa-angle-double-left"></i>
                            </a>
                            <a class="page-link" aria-label="First" th:if="${page.pageNo &gt; 11}" th:href="@{/activity/list(pageNo=${page.pageNo-10})}">
                                <i class="fa fa-angle-double-left"></i>
                            </a>
                        </li>

                        <li th:class="${page.pageNo eq 1} ? 'page-item' : 'page-item'">
                            <a class="page-link" aria-label="previous" th:if="${page.pageNo eq 1}" href="#">
                                <i class="fa fa-angle-left"></i>
                            </a>
                            <a class="page-link" aria-label="previous" th:unless="${page.pageNo eq 1}" th:href="@{/activity/list(pageNo=${page.pageNo-1})}">
                                <i class="fa fa-angle-left"></i>
                            </a>
                        </li>

                        <li th:if="${page.pageTotal eq 0}" class="page-item active"><a class="page-link" href="#">1</a></li>
                        <li th:if="${page.pageTotal ne 0}" th:each="currentPage : ${#numbers.sequence(1, page.pageTotal)}" th:class="${currentPage eq page.pageNo} ? 'page-item active' : 'page-item'">
                            <a th:if="${page.pageNo eq currentPage}" class="page-link" href="#" th:text="${currentPage}">1</a>
                            <a th:if="${page.pageNo ne currentPage} and ${currentPage ne 0}" class="page-link" th:href="@{/saleRecord/list(pageNo=${currentPage})}" th:text="${currentPage}">1</a>
                        </li>

                        <li class="page-item">
                            <a class="page-link" aria-label="Next" th:if="${page.pageNo eq page.pageTotal}" href="#">
                                <i class="fa fa-angle-right"></i>
                            </a>
                            <a class="page-link" aria-label="Next" th:if="${page.pageTotal eq 0}" href="#">
                                <i class="fa fa-angle-right"></i>
                            </a>
                            <a class="page-link" aria-label="Next" th:if="${page.pageNo lt page.pageTotal}" th:href="@{/activity/list(pageNo=${page.pageNo} + 1)}">
                                <i class="fa fa-angle-right"></i>
                            </a>
                        </li>

                        <li class="page-item">
                            <a class="page-link" aria-label="Last" th:if="${page.pageNo eq page.pageTotal}" href="#">
                                <i class="fa fa-angle-double-right"></i>
                            </a>
                            <a class="page-link" aria-label="Last" th:if="${page.pageNo ne page.pageTotal} and ${pageTotal ge (page.pageNo+10)}" th:href="@{/activity/list/(pageNo=${page.pageNo} + 10)}">
                                <i class="fa fa-angle-double-right"></i>
                            </a>
                            <a class="page-link" aria-label="Last" th:if="${page.pageNo ne page.pageTotal} and ${pageTotal lt (page.pageNo+10)}" th:href="@{/activity/list/(pageNo=${page.pageTotal})}">
                                <i class="fa fa-angle-double-right"></i>
                            </a>
                        </li>

                    </ul>
                </nav>
            </div>
            <!--页码 end-->
        </div><!-- card -->

    </div><!-- sl-pagebody -->
    <footer class="sl-footer">
        <div class="footer-left">
            <div class="mg-b-2">Copyright &copy; 2018. 中原工学院信息商务学院. All Rights Reserved.</div>
        </div>
        <div class="footer-right d-flex align-items-center">Made by 信息技术系.</div>
    </footer>
</div><!-- sl-mainpanel -->
<!-- ########## END: MAIN PANEL ########## -->



<script th:src="@{/admin/js/jquery.js}"></script>
<script th:src="@{/admin/js/popper.js}"></script>
<script th:src="@{/admin/js/bootstrap.js}"></script>
<script th:src="@{/admin/js/perfect-scrollbar.jquery.js}"></script>
<script th:src="@{/admin/js/highlight.pack.js}"></script>
<script th:src="@{/admin/js/jquery.datatables.js}"></script>
<script th:src="@{/admin/js/datatables.responsive.js}"></script>
<script th:src="@{/admin/js/select2.min.js}"></script>

<script th:src="@{/admin/js/starlight.js}"></script>
<script>
    $(function(){
        'use strict';

        $('#datatable1').DataTable({
            responsive: true,
            bLengthChange: false,
            language: {
                searchPlaceholder: '输入关键字搜索...',
                sSearch: '',
                // lengthMenu: '_MENU_ items/page',
            }
        });

        // Select2
        $('.dataTables_length select').select2({ minimumResultsForSearch: Infinity });

    });
</script>

</body>
</html>
